<?php

use Illuminate\Database\Seeder;
use Modules\Common\Support\ImportPermissions;

return new class extends Seeder
{
    /**
     * Run the seeder.
     *
     * @return void
     */
    public function run(): void
    {
        $menus = $this->menus();

        ImportPermissions::import($menus);
    }

    public function menus(): array
    {
        return [
            0 => [
                'id' => 186,
                'parent_id' => 0,
                'permission_name' => 'openapi',
                'route' => '/openapi',
                'icon' => 'bolt',
                'module' => 'openapi',
                'permission_mark' => '',
                'component' => '/layout/index.vue',
                'redirect' => '',
                'keepalive' => 1,
                'type' => 1,
                'hidden' => 1,
                'sort' => 1,
                'active_menu' => '',
                'creator_id' => 1,
                'created_at' => '2025-05-04 17:58',
                'updated_at' => '2025-06-19 20:25',
                'children' => [
                    0 => [
                        'id' => 187,
                        'parent_id' => 186,
                        'permission_name' => '请求日志',
                        'route' => 'openapiRequestLog',
                        'icon' => '',
                        'module' => 'openapi',
                        'permission_mark' => 'openapiRequestLog',
                        'component' => '/openapi/openapiRequestLog/index.vue',
                        'redirect' => '',
                        'keepalive' => 1,
                        'type' => 2,
                        'hidden' => 1,
                        'sort' => 1,
                        'active_menu' => '',
                        'creator_id' => 1,
                        'created_at' => '2025-05-04 17:58',
                        'updated_at' => '2025-05-04 17:58',
                        'children' => [
                            0 => [
                                'id' => 188,
                                'parent_id' => 187,
                                'permission_name' => '删除',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'openapiRequestLog@destroy',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 2,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            1 => [
                                'id' => 189,
                                'parent_id' => 187,
                                'permission_name' => '列表',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'openapiRequestLog@index',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 1,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                        ],
                    ],
                    1 => [
                        'id' => 190,
                        'parent_id' => 186,
                        'permission_name' => '用户管理',
                        'route' => 'users',
                        'icon' => '',
                        'module' => 'openapi',
                        'permission_mark' => 'users',
                        'component' => '/openapi/users/index.vue',
                        'redirect' => '',
                        'keepalive' => 1,
                        'type' => 2,
                        'hidden' => 1,
                        'sort' => 1,
                        'active_menu' => '',
                        'creator_id' => 1,
                        'created_at' => '2025-05-04 17:58',
                        'updated_at' => '2025-05-04 17:58',
                        'children' => [
                            0 => [
                                'id' => 191,
                                'parent_id' => 190,
                                'permission_name' => '余额重置',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@charge',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 1,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            1 => [
                                'id' => 192,
                                'parent_id' => 190,
                                'permission_name' => '删除',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@destroy',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 5,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            2 => [
                                'id' => 193,
                                'parent_id' => 190,
                                'permission_name' => '列表',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@index',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 1,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            3 => [
                                'id' => 194,
                                'parent_id' => 190,
                                'permission_name' => '重置密钥',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@regenerate',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 1,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            4 => [
                                'id' => 195,
                                'parent_id' => 190,
                                'permission_name' => '读取',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@show',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 3,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            5 => [
                                'id' => 196,
                                'parent_id' => 190,
                                'permission_name' => '新增',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@store',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 2,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                            6 => [
                                'id' => 197,
                                'parent_id' => 190,
                                'permission_name' => '更新',
                                'route' => '',
                                'icon' => '',
                                'module' => 'openapi',
                                'permission_mark' => 'users@update',
                                'component' => '',
                                'redirect' => '',
                                'keepalive' => 1,
                                'type' => 3,
                                'hidden' => 1,
                                'sort' => 4,
                                'active_menu' => '',
                                'creator_id' => 1,
                                'created_at' => '2025-05-04 17:58',
                                'updated_at' => '2025-05-04 17:58',
                            ],
                        ],
                    ],
                ],
            ],
        ];
    }
};
